Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Conversation

@galargh
Copy link
Contributor

@galargh galargh commented Aug 4, 2022

Description

This PR adds support for a new property source_ref in the repository targets. When source_ref is set, Deploy workflow will check out protocol/.github at said ref and copy the workflows from there instead of github.ref (the branch in which the workflow is running).

If source_ref is not specified, Deploy workflow will act exactly as it did before i.e. it will check out github.ref.

Why now?

We'd like to let users opt-in to Go 1.19 upgrade before we're able to perform the official release (#362).

But I think this will become useful beyond this immediate need, e.g. for continuous testing of the next branch.

Testing
Run actions/checkout@v2
  with:
    path: template-repo
    ref: refs/heads/testing
Run actions/checkout@v2
  with:
    path: template-repo
    ref: next

@galargh galargh requested a review from a team as a code owner August 4, 2022 14:45
@galargh
Copy link
Contributor Author

galargh commented Aug 4, 2022

I just thought of one more thing that we should have for this - triggering. Right now, dispatch doesn't trigger on pushes to next. And we cannot simply add next to

branches: [ master, testing ]
because then dispatch would kick off deploys with refs/heads/next for github.ref.

Maybe, at least for now, it'd be enough to add workflow_dispatch trigger to the dispatch workflow. We could guard it so that dispatch quits immediately if github.ref is different than refs/heads/master or refs/heads/testing.

With that setup, when someone creates a PR to opt-in their repos to updates from a different branch, then it gets the first update immediately after the merge to master. The subsequent upgrades happen either when master moves or Unified CI maintainers decide to kick off the dispatch workflow.

@galargh
Copy link
Contributor Author

galargh commented Aug 4, 2022

I added the workflow_dispatch trigger in 5e0b0b9 and here's a run on the testing branch that was let through the conditional checking github.ref https://github.com/protocol/.github/runs/7675207528?check_suite_focus=true

@galargh galargh merged commit af54da4 into master Aug 5, 2022
@galargh galargh deleted the template-branch-param branch August 5, 2022 13:42
galargh added a commit that referenced this pull request Aug 23, 2022
* feat: use source_ref property to determine what ref to copy workflows from

* docs: document how to opt-in to technical preview versions

* feat: allow manual dispatches of the dispatch workflow
laurentsenta added a commit that referenced this pull request Aug 23, 2022
* feat: enable support for opting in to technical preview updates (#365)

* feat: use source_ref property to determine what ref to copy workflows from

* docs: document how to opt-in to technical preview versions

* feat: allow manual dispatches of the dispatch workflow

* feat: add go-libp2p to preview

* chore: remove go-libp2p from preview

Co-authored-by: Piotr Galar <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants